package rolesystem.roles.auction;

import java.io.Serializable;

/**
 * This class represents a price.
 * Instances of this class are constant, once created they
 * cannot be changed.
 */
public class Price implements Serializable
{
	/**
	 * Amount.
	 */
	private double amount;

	/**
	 * Currency.
	 */
	private String currency;


	/**
	 * Constructor with no arguments, for
	 * serializability.
	 */
	private Price()
	{
	}


	/**
	 * @param amount Amount.
	 * @param currency Currency.
	 */
	public Price(double amount, String currency)
	{
		this.amount=amount;
		this.currency=currency;
	}


	/**
	 * Returns the amount.
	 * @return The amount.
	 */
	public double getAmount()
	{
		return amount;
	}


	/**
	 * Returns the currency.
	 * @return The currency.
	 */
	public String getCurrency()
	{
		return currency;
	}


	public String toString()
	{
		return new String(amount+" "+currency);
	}
}
